package com.woniu.cq.medical.controller;


import com.woniu.cq.medical.common.Result;
import com.woniu.cq.medical.entity.ProjectType;
import com.woniu.cq.medical.service.ProjectTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2020-09-08
 */
@RestController
@RequestMapping("/medical/project-type")
@CrossOrigin("*")//解决跨域问题
@Slf4j
public class ProjectTypeController {
    @Autowired
    private ProjectTypeService projectTypeService;

    @RequestMapping("selectProjectTypes")
    public Result selectProjectTypes(){
        List<ProjectType> projectTypes = projectTypeService.selectProjectTypes();
        return Result.success(projectTypes);
    }
}

